Servers are typically used for big applications and workloads such as those used in conjunction with large web services and manufacturing. Often, a single server does not have enough power to perform the required application. To accommodate these large applications, several servers may be used in conjunction with several shared storage devices in a storage area network (SAN). In order to accomplish synchronization, a lock may be used.
Some hardware, such as disk storage, typically does not support an atomic test-and-set operation, atomic swap operation, or equivalent operation on shared storage. A potential problem with the use of locks with this type of hardware is in the instance where a first node reads the lock, sees that it is available, then writes to the lock to claim it. In the meantime, after the first node has read the lock but before it has written to the lock, a second node reads the same lock and sees that it is available, then writes to the lock, claiming it as well. Accordingly, both nodes may think that they have control over the lock, and therefore try to alter the shared data.
A proposed solution is to reserve a separate area in the lock corresponding to each node or application to write in so that there are substantially as many reserved lock areas as nodes or applications. By doing so, an algorithm can be devised that avoids the problem described in the preceding paragraph. A potential problem with this solution is the large amount of space that may be required to hold in reserve for the various nodes and applications which may need to access shared data. Additionally, the set of nodes or applications may change over time and accommodating this change would be very difficult.
What is needed is a system and method for synchronizing mutual exclusion among multiple negotiators that does not require hardware support for an atomic test and set or swap equivalent on the shared storage, that does not require the reservation of a large amount of shared storage space and that can be dynamic to accommodate changes to the set of negotiators. The present invention addresses such needs.